﻿/*
 * Created by SharpDevelop.
 * User: phtrung
 * Date: 9/24/2009
 * Time: 2:24 PM
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */

using System;
using System.Windows.Forms;
using popLib;

namespace QuickHandBrakeTranscoder
{
	/// <summary>
	/// Class with program entry point.
	/// </summary>
	internal sealed class Program
	{
		public static string writeLogKeyword = "writeLog:";
		
		/// <summary>
		/// Program entry point.
		/// </summary>
		[STAThread]
		private static void Main(string[] args)
		{
			if(args.Length == 1 && args[0].StartsWith(writeLogKeyword)){
				writeLog( args[0].Replace(writeLogKeyword,"") );
				return;
			}
			
			Application.EnableVisualStyles();
			Application.SetCompatibleTextRenderingDefault(false);			
			Application.Run(new MainForm());
		}
		
		static string logfile = FileLib.getFullPath("MovieLog.log");
		public static void writeLog(string content){
			FileLib.writeLog( logfile, content );
		}
		
	}
}
